<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Makes an exact copy of the Imagick object</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="imagick.clippathimage.html">« Imagick::clipPathImage</a></li>
      <li style="float: right;"><a href="imagick.clutimage.html">Imagick::clutImage »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.imagick.html">Imagick</a></li>
    <li>Makes an exact copy of the Imagick object</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="imagick.clone" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::clone</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::clone</span> &mdash; <span class="dc-title">Makes an exact copy of the Imagick object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.clone-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::clone</strong></span>(): <span class="type"><a href="class.imagick.html" class="type Imagick">Imagick</a></span></div>

  <p class="para rdfs-comment">
   Makes an exact copy of the Imagick object.
  </p>
  <div class="warning"><strong class="warning">警告</strong>
   <p class="simpara">
    This function has been <em class="emphasis">DEPRECATED</em> as of imagick 3.1.0
    in favour of using the <a href="language.oop5.cloning.html" class="link">clone</a>
    keyword.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.clone-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.clone-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   A copy of the Imagick object is returned.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-imagick.clone-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>PECL imagick 3.1.0</td>
       <td>
        The method was deprecated in favour of the
        <a href="language.oop5.cloning.html" class="link">clone</a> keyword.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagick.clone-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2746">
    <p><strong>示例 #1 Imagick object cloning in different versions of imagick</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Cloning&nbsp;an&nbsp;Imagick&nbsp;object&nbsp;in&nbsp;imagick&nbsp;2.x&nbsp;and&nbsp;3.0:<br /></span><span style="color: #0000BB">$newImage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clone</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;Cloning&nbsp;an&nbsp;Imagick&nbsp;object&nbsp;from&nbsp;3.1.0&nbsp;on:<br /></span><span style="color: #0000BB">$newImage&nbsp;</span><span style="color: #007700">=&nbsp;clone&nbsp;</span><span style="color: #0000BB">$image</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div></div></div></body></html>